package com.caochenlei.recursion;

public class Age {
    public static void main(String[] args) {
        System.out.println(age(5));
    }

    //求年龄
    public static int age(int n) {
        if (n == 1) {
            return 10;
        }
        return age(n - 1) + 2;
    }
}

